#include <stdio.h>

int suan(int num)
{
	int count = 0;
	while(num)
	{
		num = num & (num - 1);
		count++;
	}
	return count;
}

int main()
{
	int num = 0;
	scanf("%d", &num);
	printf("%d ", suan(num));

	return 0;
}


